package com.scy.pojo;

public class Environment {

    private String name;
    private String addr;

    static {
        System.out.println("Environment的静态代码块执行了");
    }

    {
        System.out.println("Environment的构造代码块执行了");
    }

    public Environment() {
        System.out.println("Environment的无参构造方法执行了.");
    }

    public Environment(String name, String addr) {
        System.out.println("Environment的有参构造方法执行了.");
        this.name = name;
        this.addr = addr;
    }

    @Override
    public String toString() {
        return "Environment{" +
                "name='" + name + '\'' +
                ", addr='" + addr + '\'' +
                '}';
    }
}
